home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Essential Home & Business Collection
/
The Essential Home & Business Collection.iso
/
26
/
3
/
1
/
FNDFIL.ZIP
/
FF.BAS
next >
Wrap
BASIC Source File
|
1990-02-19
|
814b
|
24 lines
$COMPILE EXE
$LIB ALL OFF
$ERROR ALL OFF
$link "FindFile.pbu"
INPUT "File mask";mask$ 'mask can be wildcards
numfound% = 0
a$=Findfirst$(mask$)
IF a$="" THEN
PRINT mask$ ;"Not found"
END
ELSE
PRINT mask$;" found!"
INCR numfound%
PRINT USING "\ \";a$; 'print the first file
DO
a$=Findnext$
IF a$="" THEN EXIT LOOP
PRINT USING "\ \";a$;'print the rest
INCR numfound% 'note, you can save names
LOOP 'by sticking them in an
PRINT 'array, but for the demo, we
PRINT numfound%-1 ;"Files found" 'just print them
END IF